<?php
namespace Admin\Controller;
use Think\Controller;
class CommonController extends Controller {
    public function _initialize(){
        if (!C('ADMIN_CONFIG')) {
            $data = M('system_config')->find(1);
            C('ADMIN_CONFIG',$data);
        }
        if (!session('?adminid')) {
            $this->redirect('login/index');
        }else {
            $rs = M('admin')->field('account')->find(session('adminid'));
            session('account',$rs['account']);
        }
    }
}
